package com.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.beans.LogInfo;
import com.beans.UserInfo;
import com.dao.HiveDao;
import com.dao.impl.HiveDaoImpl;


@WebServlet("/Hive_LogTableServlet")
public class Hive_LogTableServlet extends HttpServlet {
	private HiveDao hiveDao=new HiveDaoImpl();
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		UserInfo user=(UserInfo)request.getSession().getAttribute("session_user");
		
		List<LogInfo> logList= hiveDao.getLogList(user.getUserName());
		request.setAttribute("logList", logList);
		request.getRequestDispatcher("/hive/log-table-result.jsp").forward(request, response);
	}

}
